package demo2;

public class Duck extends Animal implements ISWIM,IRUN,IFLY{
    public Duck(String name) {
        super(name);
    }

    @Override
    public void eat() {
        System.out.println(this.name+"正在吃蝗虫..........");
    }

    @Override
    public void fly() {
        System.out.println(this.name+"正在水面上飞..........");
    }

    @Override
    public void run() {
        System.out.println(this.name+"正在用两个鸭掌跑..........");
    }

    @Override
    public void swim() {
        System.out.println(this.name+"正在用鸭掌拨水..........");
    }
}
